package com.fanxuankai.boot.apollo.openapi.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;
import java.util.Map;

/**
 * 同步相关配置
 *
 * @author fanxuankai
 */
@ConfigurationProperties(prefix = ApolloConfigSyncProperties.PREFIX)
public class ApolloConfigSyncProperties {
    public static final String PREFIX = ApolloOpenApiProperties.PREFIX + ".sync";
    public static final String ENABLED = PREFIX + ".enabled";

    /**
     * 开关
     */
    private boolean enabled;
    /**
     * 创建人
     */
    private String createdBy = "apollo";
    /**
     * 修改人
     */
    private String lastModifiedBy = "apollo";
    /**
     * 配置列表，key: [value,备注(可选)]
     */
    private Map<String, List<String>> items;

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public String getLastModifiedBy() {
        return lastModifiedBy;
    }

    public void setLastModifiedBy(String lastModifiedBy) {
        this.lastModifiedBy = lastModifiedBy;
    }

    public Map<String, List<String>> getItems() {
        return items;
    }

    public void setItems(Map<String, List<String>> items) {
        this.items = items;
    }
}
